package com.ruoyi.labour.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.labour.domain.LabourFeedback;
import com.ruoyi.labour.domain.vo.PageVo;
import com.ruoyi.labour.mapper.FeedbackMapper;
import com.ruoyi.labour.service.FeedbackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FeedbackServiceImpl implements FeedbackService {

    @Autowired
    private FeedbackMapper feedbackMapper;
    @Override
    public R selectFeedback(PageVo pageVo) {

        PageHelper.startPage(pageVo.getPage(), pageVo.getSize());
        List<LabourFeedback> labourFeedbacks = feedbackMapper.selectFeedback();
        PageInfo pageInfo = new PageInfo(labourFeedbacks);

        return R.ok(pageInfo);
    }
}
